package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc AchievementTeamDto
 * @使用场景
 */
@Data
public class AchievementTeamDto extends BaseDto implements Serializable {

    /**
     * 成果团队ID
     */
    @ApiModelProperty("成果团队ID")
    private String achievementTeamId;

    /**
     * 成果ID
     */
    @ApiModelProperty("成果ID")
    private String achievementId;

    /**
     * 是否人工输入 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否人工输入")
    private String isManualCreate;

    /**
     * 个人账号ID
     */
    @ApiModelProperty("个人账号ID")
    private String userId;

    /**
     * 身份人员ID
     */
    @ApiModelProperty("身份人员ID")
    private String originalRoleMemberId;

    /**
     * 就职记录ID
     */
    @ApiModelProperty("就职记录ID")
    private String inductionRecordId;

    /**
     * 人工输入成员名称
     */
    @ApiModelProperty("人工输入成员名称")
    private String achievementMemberName;

    /**
     * 人工输入成员编号
     */
    @ApiModelProperty("人工输入成员编号")
    private String achievementMemberNumber;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 操作人就职记录ID
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    /**
     * 成果团队成员ID
     */
    @ApiModelProperty("成果团队成员ID")
    private String achievementTeamMemberId;

    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否存档")
    private String isArchive;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AchievementTeamDto that = (AchievementTeamDto) o;
        return (
                achievementTeamId == that.achievementTeamId &&
                        achievementId == that.achievementId &&
                        isManualCreate == that.isManualCreate &&
                        userId == that.userId &&
                        originalRoleMemberId == that.originalRoleMemberId &&
                        inductionRecordId == that.inductionRecordId &&
                        achievementMemberName == that.achievementMemberName &&
                        achievementMemberNumber == that.achievementMemberNumber &&
                        orderNumber == that.orderNumber &&
                        subjectLifeCycle == that.subjectLifeCycle &&
                        operationInductionId == that.operationInductionId &&
                        operateTime == that.operateTime &&
                        achievementTeamMemberId == that.achievementTeamMemberId &&
                        isArchive == that.isArchive
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                achievementTeamId,
                achievementId,
                isManualCreate,
                userId,
                originalRoleMemberId,
                inductionRecordId,
                achievementMemberName,
                achievementMemberNumber,
                orderNumber,
                subjectLifeCycle,
                operationInductionId,
                operateTime,
                achievementTeamMemberId,
                isArchive
        );
    }

}
